package com.amado.course0202;

/**
 * 变量的使用
 * Created by Administrator on 2018\4\3 0003.
 */
public class JavaDataType {
    public static void main(String[] args) {
    	//申明一个变量：数据类型 变量名称 = 变量初始化值
        //整型 byte类型范围-128~127   2的7次幂-1  01000000 -1   00111111
        byte sex = 0;
        //整型 short类型范围2的15次幂-1 -32768~32767
        short myShort = 123;
        //整型 int  最大值为 2的31次幂-1，最少时-2的31次幂-1
        int prce = 1234567890;
        //整型 long 最大值为 2的63次幂-1，最少时-2的63次幂-1
        long myLong = 1234567891231230L;
        //浮点型 float
        float myFloat = 1.1234567891111111111111f;
        //双浮点型 double
        double myDouble = 1.1234567891111111111111F;
        //char 类型
        char myChar1 = 'a';
        char mychar3 = '中';
        char myChar2 = 97;
        //布尔类型 值：true/false
        boolean isTrue = false;
        //<!-- -->
        System.out.println("byte=" + sex);
        System.out.println("short=" + myShort);
        System.out.println("int=" + prce);
        System.out.println("long=" + myLong);
        System.out.println("float=" + myFloat);
        System.out.println("double=" + myDouble);
        System.out.println("char1=" + myChar1);
        System.out.println("char2=" + myChar2);
        System.out.println("boolean=" + isTrue);
        System.out.println("boolean=" + !true);
        System.out.println("boolean=" + !false);
        System.out.println("mychar3=" + mychar3);

    }
}
